package my.sorter.utils;

import com.esotericsoftware.kryo.KryoSerializable;
import sun.java2d.pipe.SpanShapeRenderer;

import javax.xml.crypto.Data;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    static SimpleDateFormat sdf;
    static {
        sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    }

    public static String dateToFormattedString(Date date){
        return sdf.format(date);
    }

    public static String nowDateToFormattedString(){
        return sdf.format(new Date());
    }
}
